/**
 * @file: core.h
 * @brief: 中间层
 * @author: liaowx
 * @date: 2019.08.03
 */
#ifndef __CORE_H
#define __CORE_H

#include "app.h"

#define CMD_NUM     (2)
#define NORMAL      (0)
#define OPTIMIZE    (1)
#define GET_DEV_CTL (1)
#define COPY        (2)

struct core {
    char *arg[APP_ARG_NUM];
    char *file_name;
    struct core *(*core_ctl)(int mode, struct core *core);
    int (*copy_ctl)(char *file_name);
};

extern int match(char *app_arg, struct core *core);
extern struct core *mode_ctl(int mode, struct core *core);

#endif